package com.goddess.yeecolor.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 *TabLayout适配器
 */
public class ExerciseFragmentPagerAdapter extends FragmentPagerAdapter{

    private List<String>mTitle;
    private List<Fragment>mList;
    public ExerciseFragmentPagerAdapter(FragmentManager fm,List<Fragment>mList,List<String>mTitle) {
        super(fm);
        this.mList=mList;
        this.mTitle=mTitle;
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public int getCount() {
        return mTitle.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitle.get(position);
    }
}
